/*
 * LoggingAdapter.java  0.4.0 / Oct 23, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
package com.cute4j.logging;

/**
 * Logging adapter.
 *
 * @author Slobodan Vrkacevic
 * @version 0.4.0
 */
public interface LoggingAdapter {

  /**
   * Returns the name of the logging adapter.
   *
   * @return the name of the logging adapter
   */
  public String getName();

  /**
   * Returns <tt>true</tt> if logging on the specified level is enabled.
   *
   * @param level the logging level
   *
   * @return <tt>true</tt> if logging on the specified level is enabled
   */
  public boolean isLoggable(int level);

  /**
   * Returns the logging level.
   *
   * @return level the logging level
   */
  public int getLevel();

  /**
   * Sets the logging level.
   *
   * @param level the logging level
   */
  public void setLevel(int level);

  /**
   * Logs a message.
   *
   * @param level the logging level
   * @param message the message
   * @param t the throwable
   */
  public void log(int level, String message, Throwable t);

  /**
   * Logs a message.
   *
   * @param level the logging level
   * @param fileName the file name
   * @param lineNumber the line number
   * @param message the message
   * @param t the throwable
   */
  public void log(int level, String fileName, int lineNumber, String message,
                  Throwable t);

}
